package com.ysd.resourceusestatistics.controller;

import java.util.List;

import javax.annotation.Resource;

import com.wordnik.swagger.annotations.ApiOperation;
import com.ysd.resourceusestatistics.dao.IStatisticsDao;
import com.ysd.resourceusestatistics.model.Statistics;
import com.ysd.resourceusestatistics.util.ChartUtil;
import com.ysd.resourceusestatistics.vo.RoomChartVO;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * StatisticsController
 */
@RestController
@RequestMapping("/statistics")
public class StatisticsController {
@Resource
private IStatisticsDao statisticsDao;

@ApiOperation(value = "资源室统计使用",notes = "资源室统计使用")
@GetMapping
public List<RoomChartVO> getVo(){
List<Statistics> rList= statisticsDao.findAll();

return ChartUtil.getChart(rList);


}
    
}